projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fbd258
)
pinctrl: Avoid binding all pinconfig nodes before relocation
author
Simon Glass
<
[email protected]
>
Tue, 29 Dec 2015 12:22:52 +0000
(
05:22
-0700)
committer
Simon Glass
<
[email protected]
>
Thu, 21 Jan 2016 02:06:22 +0000
(19:06 -0700)
This can create a large number of pinctrl devices. It chews up early
malloc() memory and takes time. Only bind those which are marked as needed
before relocation.
Signed-off-by: Simon Glass <
[email protected]
>
drivers/pinctrl/pinctrl-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinctrl-uclass.c
b/drivers/pinctrl/pinctrl-uclass.c
index b5fdcd12a8251de2fc6f013a539b5ca41af94712..c42b312ddd090a0d4b9400fd6cbeb1be0ace6aec 100644
(file)
--- a/
drivers/pinctrl/pinctrl-uclass.c
+++ b/
drivers/pinctrl/pinctrl-uclass.c
@@
-111,12
+111,16
@@
static int pinconfig_post_bind(struct udevice *dev)
{
const void *fdt = gd->fdt_blob;
int offset = dev->of_offset;
+ bool pre_reloc_only = !(gd->flags & GD_FLG_RELOC);
const char *name;
int ret;
for (offset = fdt_first_subnode(fdt, offset);
offset > 0;
offset = fdt_next_subnode(fdt, offset)) {
+ if (pre_reloc_only &&
+ !fdt_getprop(fdt, offset, "u-boot,dm-pre-reloc", NULL))
+ continue;
/*
* If this node has "compatible" property, this is not
* a pin configuration node, but a normal device. skip.